package com.ziyun.pop.modules.storeMaterials.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ziyun.pop.modules.storeMaterials.entity.ErpStockEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @Author ZhaoWei
 * @Date 2018/11/24 09:20
 * @Version V1.0
 */

public interface ErpStockDao extends BaseMapper<ErpStockEntity> {

	@Select(" select stock_id from erp_stock where institution = #{sellerId} and type = 1 ")
	Integer getStockId(@Param("sellerId") Long sellerId);


	@Select(" select stock_name from erp_stock where stock_id = ${stockByOutId} and type = 1 ")
	String getStockNameByOutId(@Param("stockByOutId") Integer stockByOutId);

}
